home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / utils / hdk115l / rtflib.hdf < prev    next >
Encoding:
Text File  |  1994-04-12  |  17.2 KB  |  367 lines

  1. ;******************************************************************************
  2. ; Ver 11.5, Last Update Feb 10, 1993                                          *
  3. ;                                   rtfLIB                                    *
  4. ;                                                                             *
  5. ; This library adds functionality to HLPDK 11.0+, and adds special functions  *
  6. ; to RTF based targets : winHelp, MMViewer, RTF Word Processor target.        *
  7. ;                                                                             *
  8. ; The following added functionality is added :                                *
  9. ;                                                                             *
  10. ; Text Attributes for internal pieces of text. (bold, undeline, italic)       *
  11. ; Special Links : Graphics and Normal Non-Hilighted links.                    *
  12. ; Complete WINHELP Macro API support for WINHELP and MM Viewer targets.       *
  13. ; INCLUDING The *UNDOCUMENTED* winhelp macros!                                *
  14. ; Multimedia - MCI string interface, Video, CDAudio, and generic FUN!         *
  15. ;                                                                             *
  16. ;******************************************************************************
  17.  
  18. .ifdef rtfbased
  19.  
  20. ;******************************************************************************
  21. ;                               Text Attributes                               *
  22. ;                                                                             *
  23. ; boldText - Display text in bold, e.g. - ~Text~boldText~ - Text will be in   *
  24. ;                                         bold                                *
  25. ; italicText - Display text in italic                                         *
  26. ; underlineText - displayText in underline                                    *
  27. ; boldItalicText - display text in bold italic                                *
  28. ;                                                                             *
  29. ; fontText(fontNum) - Display Text in font# from font pallete                 *
  30. ;  e.g.   ~This is in font 3~fontText(3)~                                     *
  31. ;******************************************************************************
  32.  
  33. .userlink boldText '{\b %t}'
  34. .userlink italicText '{\i %t}'
  35. .userlink underlineText '{\ul %t}'
  36. .userlink boldItalicText '{\b\i %t}'
  37.  
  38. .userlink fontText '{\f%1 %t}'
  39.  
  40. .ifndef document
  41.  
  42. ;******************************************************************************
  43. ;                                   Topics                                    *
  44. ;                                                                             *
  45. ; dropContext - set a context point in a long topic. e.g. ~ct1~dropContext~   *
  46. ;                                                                             *
  47. ; You can later jump to this context with a !JumpID macro ..                  *
  48. ;******************************************************************************
  49.  
  50. .userlink dropContext '#{\footnote # %t}'
  51.  
  52. ;******************************************************************************
  53. ;                                    Links                                    *
  54. ;                                                                             *
  55. ; The following set of userlink templates support special link capabilities : *
  56. ;                                                                             *
  57. ; NormalTextLink(linkTarget) - Display the link text in normal color, and NOT *
  58. ;                              with the underline green format                *
  59. ; NormalTextPopup(linkTarget) - Same as above - but for popups.               *
  60. ;                                                                             *
  61. ; GraphicLink(graphicObject LinkTarget) - Display a graphic, that conects to  *
  62. ;                                         a linkTarget, the graphic object    *
  63. ;                                         should have been decalred in a      *
  64. ;                                         .GRAPHIC statement.                 *
  65. ; graphicPopup(graphicObject linkTarget) - Same as above, coonnect to a popup *
  66. ;******************************************************************************
  67.  
  68. .userlink NormalTextLink '{\uldb %t}{\v %%%1)'
  69. .userlink NormalTextPopup '{\ul %t}{\v %%%1}'
  70.  
  71. .userlink graphicLink '{\uldb \{bmc %g1\}}{\v %2}'
  72. .userlink graphicPopup '{\ul \{bmc %g1\}}{\v %2}'
  73.  
  74. .else
  75.  
  76. .userlink NormalTextLink '%t'
  77. .userlink NormalTextPopup '%t'
  78.  
  79. .userlink graphicLink '%t'
  80. .userlink graphicPopup '%t'
  81.  
  82. .endif
  83.  
  84. ;******************************************************************************
  85. ;                                   Macros                                    *
  86. ;                                                                             *
  87. ; The complete windows macro facility is supported here, with a set of        *
  88. ; !XXX macros defined as user links for general use in links, and             *
  89. ; $XXX macros as substitution macros only. (Not for topictext links)          *
  90. ;******************************************************************************
  91.  
  92. .ifndef document
  93.  
  94. .userlink !about '{\uldb %t}{\v !About()}'
  95. .userlink $about 'About()'
  96.  
  97. .userlink $addAccelarator 'AddAccelerator(%1,%2,"%3")'
  98. .userlink !addAccelarator '{\uldb %t}{\v !AddAccelerator(%1,%2,"%3")}'
  99.  
  100. .userlink $annotate 'Annotate()'
  101. .userlink !annotate '{\uldb %t}{\v !Annotate()}'
  102.  
  103. .userlink $appendItem 'AppendItem("%1","%2","%3","%4")'
  104. .userlink !appendItem '{\uldb %t}{\v !AppendItem("%1","%2","%3","%4")}'
  105.  
  106. .userlink $back 'Back()'
  107. .userlink !back '{\uldb %t}{\v !Back()}'
  108.  
  109. .userlink $bookmarkDefine 'BookmarkDefine()'
  110. .userlink !bookmarkDefine '{\uldb %t}{\v !BookmarkDefine()}'
  111.  
  112. .userlink $bookmarkMore 'BookmarkMore()'
  113. .userlink !bookmarkMore '{\uldb %t}{\v !BookmarkMore()}'
  114.  
  115. .userlink $browseButtons 'BrowseButtons()'
  116. .userlink !browseButtons '{\uldb %t}{\v !BrowseButtons()}'
  117.  
  118. .userlink $changeButtonBinding 'ChangeButtonBinding("%1","%2")'
  119. .userlink !changeButtonBinding '{\uldb %t}{\v !ChangeButtonBinding("%1","%2")}'
  120.  
  121. .userlink $changeItemBinding 'ChangeItemBinding("1","2")'
  122. .userlink !changeItemBinding '{\uldb %t}{\v !ChangeItemBinding("1","2")}'
  123.  
  124. .userlink $checkItem 'CheckItem("%1")'
  125. .userlink !checkItem '{\uldb %t}{\v !CheckItem("%1")}'
  126.  
  127. .userlink $closeWindow 'CloseWindow("%1")'
  128. .userlink !closeWindow '{\uldb %t}{\v !CloseWindow("%1")}'
  129.  
  130. .userlink $contents 'Contents()'
  131. .userlink !contents '{\uldb %t}{\v !Contents()}'
  132.  
  133. .userlink $copyDialog 'CopyDialog()'
  134. .userlink !copyDialog '{\uldb %t}{\v !CopyDialog()}'
  135.  
  136. .userlink $copyTopic 'CopyTopic()'
  137. .userlink !copyTopic '{\uldb %t}{\v !CopyTopic()}'
  138.  
  139. .userlink $createButton 'CreateButton("%1","%2","%3")'
  140. .userlink !createButton '{\uldb %t}{\v !CreateButton("%1","%2","%3")}'
  141.  
  142. .userlink $deleteItem 'DeleteItem("%1")'
  143. .userlink !deleteItem '{\uldb %t}{\v !DeleteItem("%1")}'
  144.  
  145. .userlink $deleteMark 'DeleteMark("%1")'
  146. .userlink !deleteMark '{\uldb %t}{\v !DeleteMark("%1")}'
  147.  
  148. .userlink $destroyButton 'DestroyButton("%1")'
  149. .userlink !destroyButton '{\uldb %t}{\v !DestroyButton("%1")}'
  150.  
  151. .userlink $disableButton 'DisableButton("%1")'
  152. .userlink !disableButton '{\uldb %t}{\v !DisableButton("%1")}'
  153.  
  154. .userlink $disableItem 'DisableItem("%1")'
  155. .userlink !disableItem '{\uldb %t}{\v !DisableItem("%1")}'
  156.  
  157. .userlink $enableItem 'EnableItem("%1")'
  158. .userlink !enableItem '{\uldb %t}{\v !EnableItem("%1")}'
  159.  
  160. .userlink $enableButton 'EnableButton("%1")'
  161. .userlink !enableButton '{\uldb %t}{\v !EnableButton("%1")}'
  162.  
  163. .userlink $execProgram 'ExecProgram("%1", %2)'
  164. .userlink $execProgram '!ExecProgram("%1", %{\uldb %t}{\v 2)}'
  165.  
  166. .userlink $exit 'Exit()'
  167. .userlink !exit '{\uldb %t}{\v !Exit()}'
  168.  
  169. .userlink $fileOpen 'FileOpen()'
  170. .userlink !fileOpen '{\uldb %t}{\v !FileOpen()}'
  171.  
  172. .userlink $focusWindow 'FocusWindow("%1")'
  173. .userlink !focusWindow '{\uldb %t}{\v !FocusWindow("%1")}'
  174.  
  175. .userlink $gotoMark 'GoToMark("%1")'
  176. .userlink !gotoMark '{\uldb %t}{\v !GoToMark("%1")}'
  177.  
  178. .userlin $helpOn 'HelpOn()'
  179. .userlin !helpOn '{\uldb %t}{\v !HelpOn()}'
  180.  
  181. .userlink $helpOnTop 'HelpOnTop()'
  182. .userlink !helpOnTop '{\uldb %t}{\v !HelpOnTop()}'
  183.  
  184. .userlink $history 'History()'
  185. .userlink !history '{\uldb %t}{\v !History()}'
  186.  
  187. .userlink $ifThen 'IfThen(IsMark("%1"),"%2")'
  188. .userlink !ifThen '{\uldb %t}{\v !IfThen(IsMark("%1"),"%2")}'
  189.  
  190. .userlink $ifThenElse 'IfThenElse(IsMark("%1"),"%2","%3")'
  191. .userlink !ifThenElse '{\uldb %t}{\v !IfThenElse(IsMark("%1"),"%2","%3")}'
  192.  
  193. .userlink $insertItem 'InsertItem("%1","%2","%3","%4",%5)'
  194. .userlink !insertItem '{\uldb %t}{\v !InsertItem("%1","%2","%3","%4",%5)}'
  195.  
  196. .userlink $insertMenu 'InsertMenu("%1","%2",%3)'
  197. .userlink !insertMenu '{\uldb %t}{\v !InsertMenu("%1","%2",%3)}'
  198.  
  199. .userlink $isMark 'IsMark("%1")'
  200. .userlink !isMark '{\uldb %t}{\v !IsMark("%1")}'
  201.  
  202. .userlink $jumpContents 'JumpContents("%1")'
  203. .userlink !jumpContents '{\uldb %t}{\v !JumpContents("%1")}'
  204.  
  205. .userlink $jumpContext 'JumpContext("%1",%2)'
  206. .userlink !jumpContext '{\uldb %t}{\v !JumpContext("%1",%2)}'
  207.  
  208. .userlink $jumpHelpOn 'JumpHelpOn()'
  209. .userlink !jumpHelpOn '{\uldb %t}{\v !JumpHelpOn()}'
  210.  
  211. .userlink $jumpId 'JumpId("%1","%2")'
  212. .userlink !jumpId '{\uldb %t}{\v !JumpId("%1","%2")}'
  213.  
  214. .userlink $jumpKeyword 'JumpKeyWord("%1","%2")'
  215. .userlink !jumpKeyword '{\uldb %t}{\v !JumpKeyWord("%1","%2")}'
  216.  
  217. .userlink $next 'Next()'
  218. .userlink !next '{\uldb %t}{\v !Next()}'
  219.  
  220. .userlink $not 'Not(!IsMark("%1"))'
  221. .userlink !not '{\uldb %t}{\v !Not(!IsMark("%1"))}'
  222.  
  223. .userlink $popupContext 'PopupContext("%1",%2)'
  224. .userlink !popupContext '{\uldb %t}{\v !PopupContext("%1",%2)}'
  225.  
  226. .userlink $popupId 'PopupId("%1","%2")'
  227. .userlink !popupId '{\uldb %t}{\v !PopupId("%1","%2")}'
  228.  
  229. .userlink $positionWindow 'PositionWindow(%1,%2,%3,%4,%5,"%6")'
  230. .userlink !positionWindow '{\uldb %t}{\v !PositionWindow(%1,%2,%3,%4,%5,"%6")}'
  231.  
  232. .userlink $prev 'Prev()'
  233. .userlink !prev '{\uldb %t}{\v !Prev()}'
  234.  
  235. .userlink $print 'Print()'
  236. .userlink !print '{\uldb %t}{\v !Print()}'
  237.  
  238. .userlink $printerSetup 'PrinterSetup()'
  239. .userlink !printerSetup '{\uldb %t}{\v !PrinterSetup()}'
  240.  
  241. .userlink $registerRoutine 'RegisterRoutine("%1","%2","%3")'
  242. .userlink !registerRoutine '{\uldb %t}{\v !RegisterRoutine("%1","%2","%3")}'
  243.  
  244. .userlink $removeAccelerator 'RemoveAccelerator(%1,%2)'
  245. .userlink !removeAccelerator '{\uldb %t}{\v !RemoveAccelerator(%1,%2)}'
  246.  
  247. .userlink $saveMark 'SaveMark("%1")'
  248. .userlink !saveMark '{\uldb %t}{\v !SaveMark("%1")}'
  249.  
  250. .userlink $search 'Search()'
  251. .userlink !search '{\uldb %t}{\v !Search()}'
  252.  
  253. .userlink $setContents 'SetContents("%1",%2)'
  254. .userlink !setContents '{\uldb %t}{\v !SetContents("%1",%2)}'
  255.  
  256. .userlink $setHelpOnFile 'SetHelpOnFile("%1")'
  257. .userlink !setHelpOnFile '{\uldb %t}{\v !SetHelpOnFile("%1")}'
  258.  
  259. .userlink $uncheckItem 'UncheckItem("%1")'
  260. .userlink !uncheckItem '{\uldb %t}{\v !UncheckItem("%1")}'
  261.  
  262. ;******************************************************************************
  263. ;                                UNDOCUMENTED                                 *
  264. ;                                                                             *
  265. ; Support for the undocumented functions is provided according to the         *
  266. ; documentation described in the WDDJ V5N1 "Undocumented WinHelp Macros"      *
  267. ; article by Jim Mischel.                                                     *
  268. ;                                                                             *
  269. ; The following macros are supported :                                        *
  270. ;                                                                             *
  271. ; ExtAbleItem(menu_item, toggle) - Enable and Disable the menu_item, with     *
  272. ;                                  toggle 0 = Enable, toggle 1 = Disable.     *
  273. ;                                                                             *
  274. ; ExtInsertItem - Same as InsertItem, but with one additional parameter that  *
  275. ;                 allows you to set the menu state initially to enable or     *
  276. ;                 disable state. 0 = Enable, 1 = Disable                      *
  277. ;                 Notice that the 1st parameter in this macro allows you to   *
  278. ;                 set sub-menus in menus, a thing that can not be achieved    *
  279. ;                 with the documented winhelp macros.                         *
  280. ;                                                                             *
  281. ; Notice - The following undocumented menu and item identifiers can be used : *
  282. ;          mnu_helpontopn and mnu_helpon for the starndard winhelp menu items *
  283. ;          mnu_main for the winhelp standard menubar.                         *
  284. ;          mnu_floating is the undocumented floating menu                     *
  285. ;                                                                             *
  286. ;                                                                             *
  287. ; FloatingMenu - Call the floating menu, that has been created with the       *
  288. ;                routines and the mnu_floating undocumented menu id.          *
  289. ;                                                                             *
  290. ;                                                                             *
  291. ; ResetMenu - Restore's the winhelp standard menu.                            *
  292. ;                                                                             *
  293. ; JumpHash, PopupHash - Jump according to the internal hash id.               *
  294. ;                                                                             *
  295. ;******************************************************************************
  296.  
  297. .userlink $extAbleIte 'ExtAbleItem("%1",%2)'
  298. .userlink !extAbleIte '{\uldb %t}{\v !ExtAbleItem("%1",%2)}'
  299.  
  300. .userlink $extInsertItem 'InsertItem("%1","%2","%3","%4",%5,%6)'
  301. .userlink !extInsertItem '{\uldb %t}{\v !InsertItem("%1","%2","%3","%4",%5,%6)}'
  302.  
  303. .userlink $floatingMenu 'FloatingMenu()'
  304. .userlink !floatingMenu '{\uldb %t}{\v !FloatingMenu()}'
  305.  
  306. .userlink $resetMenu 'ResetMenu()'
  307. .userlink !resetMenu '{\uldb %t}{\v !ResetMenu()}
  308.  
  309. .userlink $jumpHash 'JumpHash(%1)'
  310. .userlink !jumpHash '{\uldb %t}{\v !JumpHash(%1)}'
  311.  
  312. .userlink $PopupHash 'PopupHash(%1)'
  313. .userlink !PopupHash '{\uldb %t}{\v !PopupHash(%1)}'
  314.  
  315. .endif
  316.  
  317. ;******************************************************************************
  318. ;                                 MultiMedia                                  *
  319. ;                                                                             *
  320. ; The following set of userlinks, and external routine reference, provide     *
  321. ; access to Video, CDAudio, MCI string interface, and other FUN stuff.        *
  322. ;                                                                             *
  323. ;                                                                             *
  324. ;******************************************************************************
  325.  
  326. .ifndef document
  327.  
  328. ;******************************************************************************
  329. ;                                mciSendString                                *
  330. ;                                                                             *
  331. ; this is the interface to the multimedia send string interface.              *
  332. ;                                                                             *
  333. ; Video : (AVI files, must have VfW drivers installed to use)                 *
  334. ;                                                                             *
  335. ; videoLink used in links, parameter 1 is the path to the AVI file.           *
  336. ;           Notice that the AVI file has to be in the "current directory".    *
  337. ; videoOpen, videoPlay and videoClose are .ACTION strings of topics, in       *
  338. ;            HLPDK V11.0 or later (not V10.0), and must appear in that order. *
  339. ;                                                                             *
  340. ; CDAudio : (RED Book CD Audio)                                               *
  341. ;                                                                             *
  342. ; CDAudioLink , parameter 1 is the start track to play from, parameter 2 -    *
  343. ;               the track to play to ..                                       *
  344. ;                                                                             *
  345. ; Generic MCI String command interface :                                      *
  346. ;                                                                             *
  347. ; mciStringLink - Parameter 1 is the MCI String to send.                      *
  348. ; mciStringAct  - Used for .ACTION topic attributes in HLPDK V11.0 or later.  *
  349. ;******************************************************************************
  350. .routine mciSendString MMSYSTEM SUuu
  351.  
  352. .userlink videoLink '{\uldb %t}{\v !mciSendString("play %1",0,0,0)}'
  353. .userlink videoOpen 'mciSendString("open AVIVideo!%1 alias vid",0,0,0)'
  354. .userlink videoPlay 'mciSendString("play vid wait",0,0,0)'
  355. .userlink videoClose 'mciSendString("close vid",0,0,0)'
  356.  
  357. .userlink CDAudioLink '{\uldb %t}{\v !mciSendString("open CDAudio",0,0,0)}{\v !mciSendString("play CDAudio from %1 to %2 wait",0,0,0)}{\v !mciSendString("close CDAudio",0,0,0)}'
  358.  
  359. .userlink mciStringLink '{\uldb %t}{\v !mciSendString("%1",0,0,0)}'
  360. .userlink mciStringAct  'mciSendString("%1",0,0,0)}'
  361.  
  362. .endif
  363.  
  364. .endif
  365.  
  366.  
  367.